package site.assad.common;

import org.aspectj.lang.annotation.Pointcut;

/**
 * Author: Al-assad 余林颖
 * E-mail: yulinying_1994@outlook.com
 * Date: 2017/12/5 20:28
 * Description: 测试 @AfterThrowing 的目标类
 */
public class ThrowExceptionTarget {

    @Pointcut  //显式标记切点，也可以不标记该切点，在切面类中使用切点表达式定位即可
    public void ohShit() {
        System.out.println("Oh Shit,Here throwing a exception");
        try{
            throw new UnsupportedOperationException("no support operation here,go out :) ");
        }catch(Exception e){

        }

    }
}
